package com.cn.redis.dto;

import java.util.concurrent.atomic.AtomicLong;

public class b {
    private AtomicLong f = new AtomicLong(0L);
    private volatile long g;
    private volatile int step;
    private c h;

    public b(c buffer) {
        this.h = buffer;
    }

    public AtomicLong d() {
        return this.f;
    }

    public void a(AtomicLong value) {
        this.f = value;
    }

    public long getMax() {
        return this.g;
    }

    public void b(long max) {
        this.g = max;
    }

    public int getStep() {
        return this.step;
    }

    public void setStep(int step) {
        this.step = step;
    }

    public c e() {
        return this.h;
    }

    public long f() {
        return this.getMax() - this.d().get();
    }

    public String toString() {
        StringBuilder sb = new StringBuilder("Segment(");
        sb.append("value:");
        sb.append(this.f);
        sb.append(",max:");
        sb.append(this.g);
        sb.append(",step:");
        sb.append(this.step);
        sb.append(")");
        return sb.toString();
    }
}